#pragma once
//============================================================================
// Copyright (C) 2012-2013 Brett R. Jones 
// All Rights Reserved
//
// You may redistribute and/or modify for non commercial and commercial uses 
// provided this copyright notice remains in place and is not modified
//
// This code is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// brettjones1900@gmail.com
// http://www.p2panarchy.com
//============================================================================

#include <string>
#include <vector>
#include "SharedFileInfo.h"
#include <VxUtilLib/VxSearchFlags.h>


class VxThread;

class SharedDirInfo : public VxSearchFlags
{
public:
	std::string						m_strRootDir;
	std::vector<SharedFileInfo>		m_oFileList;
	S64								m_s64TotalByteCnt;

	SharedDirInfo(std::string& dir);

	void		updateFileList( VxThread * poThread );
	bool		localFileNameToRemoteFileName( std::string& strLocalFileName, std::string& strRetRemoteFileName );
	bool		remoteFileNameToLocalFileName( std::string& strRemoteFileName, std::string& strRetLocalFileName );

private:
	bool		massageFileList( VxThread * poThread );
};
